export top_dir ::= $(shell pwd)

export build_dir ::= $(shell pwd)/build/

# allow gcc trampolines, all obj as PIC?
export CFLAGS ::= -MMD -Wall -Wextra -Werror -Wshadow -std=c11 -fPIC
ifdef debug
CFLAGS += -save-temps=obj -g
endif

# scrapper bot build dirs
src_dir ::= $(shell pwd)/src/
export build_bot_dir ::= $(build_dir)/bot/
export bot_include ::= $(src_dir)
export bot_lib_path ::= $(build_bot_dir)
export bot_shared_lib ::= $(bot_lib_path)/libscrapper.so

# test
export build_test_dir := $(build_dir)test/

dep_src_dir := $(shell pwd)/deps/
data_dir := $(shell pwd)/data/
test_dir := $(shell pwd)/test/

# telebot dep
export telebot_dep_build_dir := $(build_dir)/deps/telebot/
export telebot_lib := $(telebot_dep_build_dir)/libtelebot_static.a
export telebot_include := $(dep_src_dir)/telebot/include

# zlog dep
export zlog_dep_build_dir := $(build_dir)/deps/zlog
export zlog_lib := $(zlog_dep_build_dir)/lib/libzlog.a
export zlog_include := $(zlog_dep_build_dir)/include

# cmoka dep
export cmoka_dep_build_dir := $(build_dir)/deps/cmoka
export cmoka_lib_path := $(cmoka_dep_build_dir)/src/
export cmoka_include := $(dep_src_dir)/cmoka/include
